import openpyxl
from  openpyxl.styles import fonts
#from  openpyxl.styles import  Font
wb  = openpyxl.Workbook()
ws=wb.active # or wb.active
#default 11pt,Calibri
ws.title= 'Font'
italic24Font= fonts.Font(size=24,italic=True)
ws['A1'].font=italic24Font
ws['A1']='24pt Italic'

#formulas
ws=wb.create_sheet('formulas')
ws['A1']=100
ws['A2']=300
ws['A3']='=SUM(A1:A2)'

#set row height and column width
ws=wb.create_sheet('dimensions')
ws['A3']='tall row'
ws.row_dimensions[3].height =70
ws['B2']='wide column'
ws.column_dimensions['B'].width = 20

#merge cells
ws=wb.create_sheet('merged')
ws.merge_cells('A1:D3')
ws['A1']='tweleve cells merged together'
ws.merge_cells('C5:D5')
ws['C5']='two merged cells'

#unmerge cells
ws=wb.copy_worksheet(wb['merged'])
ws.title='unmerged'
ws.unmerge_cells('A1:D3')
ws['A1']='tweleve cells unmerged together'
ws.unmerge_cells('C5:D5')
ws['C5']='two unmerged cells'

#pie chart
from  openpyxl.chart import (reference,Series,pie_chart,bubble_chart)
piedata=[
    ['pie','sold'],

]

wb.save('./pyabc_excel/example_day32.xlsx')

